home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / X11 / config / hpLib.rules < prev    next >
Text File  |  2006-04-12  |  5KB  |  145 lines

  1. XCOMM $Xorg: hpLib.rules,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
  2.  
  3. /*
  4.  * HP shared library rules
  5.  */
  6.  
  7. XCOMM $XFree86: xc/config/cf/hpLib.rules,v 3.3 1999/01/11 05:13:06 dawes Exp $
  8.  
  9. #ifndef HasSharedLibraries
  10. # define HasSharedLibraries YES
  11. #endif
  12. #ifndef SharedDataSeparation
  13. # define SharedDataSeparation NO
  14. #endif
  15. #ifndef SharedCodeDef
  16. # define SharedCodeDef /**/
  17. #endif
  18. #ifndef SharedLibraryDef
  19. # define SharedLibraryDef /**/
  20. #endif
  21. #ifndef ShLibIncludeFile
  22. # define ShLibIncludeFile <hpLib.tmpl>
  23. #endif
  24. #ifndef SharedLibraryLoadFlags
  25. # define SharedLibraryLoadFlags -b
  26. #endif
  27. #ifndef PositionIndependentCFlags
  28. # define PositionIndependentCFlags +z
  29. #endif
  30. #ifndef LargePositionIndependentCFlags
  31. # define LargePositionIndependentCFlags +Z
  32. #endif
  33. #ifndef InstLibFlags
  34. # define InstLibFlags -m 0555
  35. #endif
  36. #ifndef UseInstalled
  37. /* assert: LdPostLib pulls in -L$(USRLIBDIR), so it doesn't need to be here */
  38. # define ExtraLoadFlags -Wl,+s -Wl,+b$(USRLIBDIRPATH)
  39. #endif
  40. #ifndef UseExportLists
  41. # define UseExportLists    YES
  42. #endif
  43.  
  44. /* Pre-linking shared libraries is supported in HP/UX 10. */
  45. #if OSMajorVersion > 9
  46. # define HPRequiredLibs    $(LDPRELIBS) $(REQUIREDLIBS) +s +b $(USRLIBDIRPATH)
  47. #else
  48. # define HPRequiredLibs    $(REQUIREDLIBS)
  49. #endif
  50.  
  51. #ifndef LinkWithExports
  52. # if UseExportLists
  53. #  define LinkWithExports(libname,rev,solist,down,up) \
  54.     (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) +h $@ solist HPRequiredLibs)    @@\
  55.     if [ -f Concat(lib,libname.elist) ]; then \            @@\
  56.         RemoveFiles($@.exports $@.list); \                @@\
  57.         $(CPP) $(ALLINCLUDES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES) Concat(lib,libname.elist) | CppSedMagic >$@.list; \    @@\
  58.         $(EXPORTLISTGEN) $@~ $@.list > $@.exports; \        @@\
  59.         (cd down; $(LD) -c up/$@.exports -o up/$@~ $(SHLIBLDFLAGS) +h $@ solist HPRequiredLibs); \ @@\
  60.         RemoveFiles($@.exports $@.list); \                @@\
  61.     fi
  62. # else
  63. #  define LinkWithExports(libname,rev,solist,down,up) \
  64.     (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) +h $@ solist HPRequiredLibs)
  65. # endif
  66. #endif
  67.  
  68. /*
  69.  * InstallSharedLibrary - generate rules to install the shared library.
  70.  */
  71. #ifndef InstallSharedLibrary
  72. # define InstallSharedLibrary(libname,rev,dest)                @@\
  73. install:: Concat(lib,libname.sl.rev)                     @@\
  74.     MakeDir($(DESTDIR)dest)                        @@\
  75.     RMoveToBakFile(Concat($(DESTDIR)dest/lib,libname.sl.rev))    @@\
  76.     $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.sl.rev) $(DESTDIR)dest @@\
  77.     $(RM) Concat($(DESTDIR)dest/lib,libname.sl)            @@\
  78.     cd $(DESTDIR)dest; $(LN) Concat(lib,libname.sl.rev) Concat(lib,libname.sl) @@\
  79.     -RemoveFile(Concat(lib,libname.sl.rev.bak))
  80.  
  81. #endif /* InstallSharedLibrary */
  82.  
  83. /*
  84.  * InstallSharedLibraryData - generate rules to install the shared library data
  85.  */
  86. #ifndef InstallSharedLibraryData
  87. # define InstallSharedLibraryData(libname,rev,dest)
  88. #endif /* InstallSharedLibraryData */
  89.  
  90.  
  91. /*
  92.  * SharedLibraryTarget - generate rules to create a shared library;
  93.  * build it into a different name so that we do not hose people by having
  94.  * the library gone for long periods.
  95.  */
  96. #ifndef SharedLibraryTarget
  97. # define SharedLibraryTarget(libname,rev,solist,down,up)        @@\
  98. AllTarget(Concat(lib,libname.sl.rev))                    @@\
  99.                                     @@\
  100. Concat(lib,libname.sl.rev):  solist $(EXTRALIBRARYDEPS)            @@\
  101.     $(RM) $@~                            @@\
  102.     LinkWithExports(libname,rev,solist,down,up)            @@\
  103.     -RemoveFiles($@ $@.bak)                        @@\
  104.     MoveToBakFile($@)                        @@\
  105.     $(MV) $@~ $@                            @@\
  106.     $(RM) Concat(lib,libname.sl)                    @@\
  107.     $(LN) $@ Concat(lib,libname.sl)                    @@\
  108.     LinkBuildLibrary($@)                        @@\
  109.     LinkBuildLibrary(Concat(lib,libname.sl))            @@\
  110.                                     @@\
  111. clean::                                    @@\
  112.     $(RM) Concat(lib,libname.sl.rev) Concat(lib,libname.sl)
  113.  
  114. #endif /* SharedLibraryTarget */
  115.  
  116. /*
  117.  * SharedDepLibraryTarget - generate rules to create a shared library.
  118.  */
  119. #ifndef SharedDepLibraryTarget
  120. # define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up)    @@\
  121. AllTarget(Concat(lib,libname.sl.rev))                    @@\
  122.                                     @@\
  123. Concat(lib,libname.sl.rev):  deplist $(EXTRALIBRARYDEPS)        @@\
  124.     $(RM) $@~                            @@\
  125.     LinkWithExports(libname,rev,solist,down,up)            @@\
  126.     -RemoveFiles($@ $@.bak)                        @@\
  127.     MoveToBakFile($@)                        @@\
  128.     $(MV) $@~ $@                            @@\
  129.     $(RM) Concat(lib,libname.sl)                    @@\
  130.     $(LN) $@ Concat(lib,libname.sl)                    @@\
  131.     LinkBuildLibrary($@)                        @@\
  132.     LinkBuildLibrary(Concat(lib,libname.sl))            @@\
  133.                                     @@\
  134. clean::                                    @@\
  135.     $(RM) Concat(lib,libname.sl.rev) Concat(lib,libname.sl)
  136.  
  137. #endif /* SharedDepLibraryTarget */
  138.  
  139. /*
  140.  * SharedLibraryDataTarget - generate rules to create shlib data file;
  141.  */
  142. #ifndef SharedLibraryDataTarget
  143. # define SharedLibraryDataTarget(libname,rev,salist)
  144. #endif /* SharedLibraryTarget */
  145.